<p>Method/constructor references are more compact and readable than using lambdas, and are therefore preferred.</p>

<p>
  <strong>Note</strong> that this rule is automatically disabled when the project's<code>sonar.java.source</code> is lower than <code>8</code>.
</p>

<h2>Noncompliant Code Example</h2>
<pre>
  List<Integer> list = new ArrayList<Integer>();
  list.add(0);
  list.add(1);
  list.add(2);

    list.forEach(n -> { System.out.println(n); });
</pre>

<h2>Compliant Solution</h2>
<pre>
  List<Integer> list = new ArrayList<Integer>();
  list.add(0);
  list.add(1);
  list.add(2);

  list.forEach(System.out::println);
</pre>
